Information processing apparatus, non-transitory computer-readable storage medium having stored therein information processing program, information processing system, and information processing method

ABSTRACT

An example of a controller calculates the orientation of the controller based on an output from an inertial sensor, and when a value representing the calculated orientation satisfies a first condition, compresses data in a mode  2,  and when the first condition is not satisfied, but a second condition is satisfied, compresses the data in a mode  1,  and when the second condition is not satisfied, compresses the data in a mode  0.  Then, the controller transmits the compressed data to another apparatus.

CROSS REFERENCE TO RELATED APPLICATION

The disclosure of Japanese Patent Application No. 2018-172478, filed onSep. 14, 2018, is incorporated herein by reference.

FIELD

The present disclosure relates to an information processing apparatusincluding a sensor, a non-transitory computer-readable storage mediumhaving stored therein an information processing program, an informationprocessing system, and an information processing method.

BACKGROUND AND SUMMARY

For example, as the background art, there is an apparatus including asensor and for compressing data from the sensor and transmitting thedata to another apparatus.

However, there is room for improvement in a method in which an apparatusincluding a sensor compresses data detected by the sensor, in view ofthe maintenance of the accuracy of data when the compressed data isrestored.

Therefore, it is an object of an exemplary embodiment to provide aninformation processing apparatus capable of, when compressing andrestoring data based on an output from a sensor, maintaining theaccuracy of data.

To achieve the above object, the exemplary embodiment employs thefollowing configurations.

An information processing apparatus according to an aspect of theexemplary embodiment is an information processing apparatus including aninertial sensor, the information processing apparatus including at leastone processor configured to: based on an output from the inertial sensorat a first timing, acquire a first value regarding an orientation or aposition of the information processing apparatus; based on an outputfrom the inertial sensor at a second timing different from the firsttiming, acquire a second value regarding the orientation or the positionof the information processing apparatus; based on at least one of thefirst value and the second value, determine whether or not a firstcondition is satisfied; when it is determined that the first conditionis satisfied, compress at least one of the first value and the secondvalue by a first method, thereby generating first compressed dataincluding data related to the first value and data related to the secondvalue; and when it is determined that the first condition is notsatisfied, compress at least one of the first value and the second valueby a second method different from the first method, thereby generatingsecond compressed data including data related to the first value anddata related to the second value.

Based on the above, based on a value regarding the orientation or theposition of an apparatus, it is possible to determine whether or not afirst condition is satisfied. When the first condition is satisfied, itis possible to compress data by a first method, and when the firstcondition is not satisfied, it is possible to compress the data by asecond method. Consequently, in accordance with the state of aninformation processing apparatus, it is possible to select a compressionmethod appropriate for maintaining the accuracy of data.

In another aspect, the at least one processor may further configured totransmit the first compressed data or the second compressed data toanother apparatus.

Based on the above, it is possible to transmit the compressed data toanother apparatus, and another apparatus can restore the data.

In another aspect, based on at least a difference between the firstvalue and the second value, it may be determined whether or not thefirst condition is satisfied.

Based on the above, based on the difference between a first value and asecond value, it is possible to determine whether or not the firstcondition is satisfied.

In another aspect, the at least one processor may be further configuredto, based on an output from the inertial sensor at a third timingdifferent from the first timing and the second timing, acquire a thirdvalue regarding the orientation or the position of the informationprocessing apparatus. Based on a difference between an average of thefirst value and the second value, and the third value, it may bedetermined whether or not the first condition is satisfied.

Based on the above, it is possible to calculate the difference betweenthe average of a first value and a second value, and a third value, andbased on the difference, determine whether or not the first condition issatisfied.

In another aspect, as the determination of whether or not the firstcondition is satisfied, it may be determined whether or not theinformation processing apparatus is in a state where the informationprocessing apparatus is at rest.

Based on the above, when the information processing apparatus is in thestate where the information processing apparatus is at rest, it ispossible to compress the data by the first method.

In another aspect, as the determination of whether or not the firstcondition is satisfied, it may be determined whether or not an amount ofchange in the orientation or the position of the information processingapparatus is less than a predetermined value.

Based on the above, when the amount of change in the orientation or theposition of the information processing apparatus is less than apredetermined value, it is possible to compress the data by the firstmethod.

In another aspect, as the first method, the first compressed data may begenerated so that an amount of either one of the data related to thefirst value and the data related to the second value is greater than anamount of the other.

Based on the above, the first compressed data is generated so that theamount of one of pieces of data is greater than the amount of the other.Thus, it is possible to make the amount of information to be lostregarding data of one of pieces of data. Thus, it is possible tomaintain the accuracy of data when the data is compressed.

In another aspect, the at least one processor may be further configuredto, based on an output from the inertial sensor at a third timingdifferent from the first timing and the second timing, acquire a thirdvalue regarding the orientation or the position of the informationprocessing apparatus. Data related to the third value set based on thefirst value, the second value, and the third value may be compressed,thereby generating the first compressed data further including thecompressed data related to the third value.

Based on the above, based on a first value and a second value, it ispossible to compress data related to a third value.

In another aspect, as the first method, the data related to the firstvalue and the data related to the second value may be compressed so thatan amount of the data related to the second value is greater than anamount of the data related to the first value, and the data related tothe third value is further compressed so that the amount of the datarelated to the third value is smaller than the amount of the datarelated to the first value, thereby generating the first compressed dataincluding the compressed data related to the first value, the compresseddata related to the second value, and the compressed data related to thethird value.

Based on the above, the amounts of data of pieces of data related tothree values are varied, whereby it is possible to make the amount ofinformation to be lost regarding data related to the second value, andit is possible to maintain the accuracy of data.

In another aspect, the second value may be set as the compressed datarelated to the second value, a difference between the first value andthe second value may be set as the compressed data related to the firstvalue, and a difference between an average of the first value and thesecond value, and the third value may be set as the compressed datarelated to the third value, thereby generating the first compresseddata.

Based on the above, it is possible to compress the data related to thesecond value, thereby setting the second value as it is as the datarelated to the second value. Regarding the first value, it is possibleto set the difference between the first value and the second value asdata related to the first value. Regarding the third value, it ispossible to set the difference as data related to the third value.Consequently, it is possible to reduce the amount of data as a whole andalso restore the three values.

In another aspect, the at least one processor may be further configuredto, when it is determined that the first condition is not satisfied,then at least based on the first value and the second value, determinewhether or not a second condition different from the first condition issatisfied. When it is determined that the second condition is satisfied,the second compressed data may be generated.

Based on the above, when it is determined that the first condition issatisfied, it is determined whether or not a second condition issatisfied. When the second condition is satisfied, it is possible tocompress the data by the second method. Consequently, in accordance withthe state of the apparatus, it is possible to select an appropriatecompression method.

In another aspect, as the determination of whether or not the secondcondition is satisfied, it may be determined whether or not theorientation or the position of the information processing apparatuschanges linearly.

Based on the above, when the orientation or the position of theinformation processing apparatus changes linearly, it is possible tocompress the data by the second method.

In another aspect, the at least one processor may be further configuredto, based on an output from the inertial sensor at a third timingdifferent from the first timing and the second timing, acquire a thirdvalue regarding the orientation or the position of the informationprocessing apparatus. Based on whether or not the first value, thesecond value, and the third value have linearity, it may be determinedwhether or not the second condition is satisfied.

Based on the above, based on whether or not a first value, a secondvalue, and a third value change linearly, it is possible to determinewhether or not the second condition is satisfied.

In another aspect, at least when a difference between an average of thefirst value and the second value, and the third value is a predeterminedrange, it may be determined that the second condition is satisfied.

Based on the above, when the difference is within a predetermined range,it is possible to compress the data by the second method.

In another aspect, a component having the largest absolute value among aplurality of components included in any one of the first value, thesecond value, and the third value may be specified. Regarding the twovalues other than the one of the first value, the second value, and thethird value, components corresponding to the specified component may becompared with a predetermined value, and based on a result of thecomparison, it may be determined whether or not the second condition issatisfied.

Based on the above, when each of the first value, the second value, andthe third value has a plurality of components, for example, the largestcomponent of the third value is specified, and based on the result ofcomparing the same components of the first value and the second value asthe specified component, and a predetermined value, it is possible todetermine whether or not the second condition is satisfied.

In another aspect, as the second method, data related to the third valuemay be set based on an average of the first value and the second value,and the data related to the third value may be compressed, therebygenerating the second compressed data including the compressed datarelated to the third value.

Based on the above, the value of the third value is not set as it is asdata related to the third value, but data is set based on the average ofthe first value and the second value. Thus, it is possible to make avalue to be set as the data related to the third value relatively small.

In another aspect, the at least one processor may be further configuredto, based on at least two of the first value, the second value, and thethird value, calculate a predetermined reference value. As the secondmethod, data related to at least one of the first value, the secondvalue, and the third value may be set based on the reference value, andthe data related to the at least one value may be compressed, therebygenerating the second compressed data including the compressed data.

Based on the above, for example, the value of the third value is not setas it is as data related to the third value, but data is set based on areference value based on the first value and the second value. Thus, itis possible to make a value to be set as the data related to the thirdvalue relatively small.

In another aspect, as the second method, as the second method, the datarelated to the first value, the data related to the second value, anddata related to the third value may be compressed so that amounts of thedata related to the first value and the data related to the second valueare equal to each other, and the amounts of the data related to thefirst value and the data related to the second value are greater than anamount of the data related to the third value.

Based on the above, the amounts of data when data related to the firstvalue and data related to the second value are compressed are maderelatively great, whereby it is possible to make the amount ofinformation to be lost small. Thus, it is possible to maintain theaccuracy of data.

In another aspect, the second timing may be a timing after the firsttiming. The third timing may be a timing between the first timing andthe second timing.

Based on the above, it is possible to determine a condition based oninformation output from an inertial sensor at a first timing, a secondtiming, and a third timing in this order and compress the data.

In another aspect, the at least one processor may be further configuredto, when it is determined that the second condition is not satisfied,compress at least the data related to the first value and the datarelated to the second value by a third method different from the firstmethod and the second method, thereby generating third compressed dataincluding the data related to the first value and the data related tothe second value.

Based on the above, when it is determined that the second condition isnot satisfied, it is possible to further compress the data by a thirdmethod.

In another aspect, the first value and the second value may be dataincluding a plurality of components, and the plurality of componentshave a predetermined relationship. The data related to the first valueand the data related to the second value may be data obtained byomitting at least one of the plurality of components. The thirdcompressed data may include information indicating the component omittedfrom the data related to the first value and information indicating thecomponent omitted from the data related to the second value.

Based on the above, in the compression by the third method, it ispossible to vary components to be omitted between a first value and asecond value.

In another aspect, the at least one processor is further configured to:based on the output from the inertial sensor at the first timing,calculate the first value representing the orientation or the positionof the apparatus; based on the output from the inertial sensor at thesecond timing, calculate the second value representing the orientationor the position of the apparatus; and transmit data including the firstvalue and the second value to another apparatus.

Based on the above, based on an output from an inertial sensor, theinformation processing apparatus can calculate a value representing theorientation or the position of the apparatus, compress the value, andtransmit the value to another apparatus.

Further, an information processing apparatus according to anotherexemplary embodiment is an information processing apparatus including aninertial sensor, the information processing apparatus including firstacquisition means, second acquisition means, and data compression means.Based on an output from the inertial sensor at a first timing, the firstacquisition means acquires a first value regarding an orientation or aposition of the information processing apparatus. Based on an outputfrom the inertial sensor at a second timing different from the firsttiming, the second acquisition means acquires a second value regardingthe orientation or the position of the information processing apparatus.The data compression means compresses at least one of data related tothe first value and data related to the second value so that an amountof either one of the data related to the first value and the datarelated to the second value is greater than an amount of the other.

Based on the above, data is compressed so that the amount of either oneof data related to a first value and data related to a second value isgreater than the amount of the other. Thus, it is possible to make theamount of information to be lost in one of pieces of data. Thus, it ispossible to maintain the accuracy of data.

An information processing apparatus according to another exemplaryembodiment is an information processing apparatus including an inertialsensor, the information processing apparatus including first calculationmeans, second calculation means, and transmission means. Based on anoutput from the inertial sensor at a first timing, the first calculationmeans calculates a first value representing an orientation or a positionof the apparatus. Based on an output from the inertial sensor at asecond timing different from the first timing, the second calculationmeans calculates a second value representing the orientation or theposition of the apparatus. The transmission means transmits dataincluding the first value and the second value to another apparatus.

Based on the above, an apparatus can calculate a value representing theorientation or the position of the apparatus based on an output from aninertial sensor and transmit the value to another apparatus.Consequently, another apparatus can accurately recognize the orientationof the information processing apparatus.

In another aspect, the information processing apparatus may furtherinclude compression means for compressing at least one of the firstvalue and the second value. The transmission means may transmit the datacompressed by the compression means to the other apparatus.

Based on the above, the information processing apparatus can compress atleast one of a first value and a second value and transmit thecompressed value to another apparatus.

In another aspect, the transmission means may transmit the dataincluding time information regarding the first timing or the secondtiming to the other apparatus.

Based on the above, it is possible to further transmit time informationto another apparatus.

In another aspect, the first value and the second value may bequaternions representing the orientation of the information processingapparatus.

Based on the above, the information processing apparatus can calculate aquaternion representing the orientation and transmit the quaternion toanother apparatus.

In another aspect, the information processing apparatus may furtherinclude determination means, first data compression means, and seconddata compression means. Based on at least one of the first value and thesecond value, the determination means may determine whether or not afirst condition is satisfied. When the determination means determinesthat the first condition is satisfied, the first data compression meansmay compress at least one of the first value and the second value by afirst method, thereby generating first compressed data including datarelated to the first value and data related to the second value. Whenthe determination means determines that the first condition is notsatisfied, the second data compression means may compress at least oneof the first value and the second value by a second method differentfrom the first method, thereby generating second compressed dataincluding the data related to the first value and the data related tothe second value.

Based on the above, in accordance with the state of the informationprocessing apparatus, it is possible to select an appropriatecompression method.

Further, another exemplary embodiment may be a program executed by theinformation processing apparatus, an information processing method, oran information processing system including the above informationprocessing apparatus and another apparatus.

According to the exemplary embodiment, when data from a sensor iscompressed and restored, it is possible to maintain the accuracy ofdata.

These and other objects, features, aspects and advantages of theexemplary embodiments will become more apparent from the followingdetailed description of the exemplary embodiments when taken inconjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing an example of the state where an examplenon-limiting left controller 3 and an example non-limiting rightcontroller 4 are attached to an example non-limiting main body apparatus2;

FIG. 2 is a diagram showing an example of the state where each of theexample non-limiting left controller 3 and the example non-limitingright controller 4 is detached from the example non-limiting main bodyapparatus 2;

FIG. 3 is a block diagram showing an example of the internalconfigurations of the example non-limiting main body apparatus 2 and theexample non-limiting right controller 4;

FIG. 4 is a diagram showing the flow of processing performed whenorientation data is transmitted from the example non-limiting rightcontroller 4 to the example non-limiting main body apparatus 2;

FIG. 5 is a diagram showing examples of a plurality of examplenon-limiting modes;

FIG. 6 is an example non-limiting diagram conceptually representingformula 4;

FIG. 7 is an example non-limiting diagram conceptually representing afirst condition B;

FIG. 8A is an example non-limiting diagram showing an example of thedata structure of first compressed data generated when a mode 2 isselected;

FIG. 8B is an example non-limiting diagram showing an example of thedata structure of second compressed data generated when a mode 1 isselected;

FIG. 8C is an example non-limiting diagram showing an example of thedata structure of third compressed data generated when a mode 0 isselected;

FIG. 9 is an example non-limiting diagram showing the comparison betweenthe orientation data before being compressed when the orientation datais compressed in the mode 2, and the orientation data after thecompressed orientation data is transmitted to the main body apparatusand restored in accordance with the main body apparatus;

FIG. 10 is a diagram showing an example of example non-limiting datastored in a controller;

FIG. 11 is a flow chart showing an example of example non-limitingprocessing performed by the controller;

FIG. 12 is a flow chart showing an example of example non-limitingprocessing performed by the main body apparatus 2; and

FIG. 13 is an example non-limiting diagram showing examples of changesin the orientation of the controller and modes to be selected.

DETAILED DESCRIPTION OF NON-LIMITING EXAMPLE EMBODIMENTS

An information processing system according to an example of an exemplaryembodiment is described below. An example of an information processingsystem 1 according to the exemplary embodiment includes a main bodyapparatus 2, a left controller 3, and a right controller 4.

FIG. 1 is a diagram showing an example of the state where the leftcontroller 3 and the right controller 4 are attached to the main bodyapparatus 2. As shown in FIG. 1, each of the left controller 3 and theright controller 4 is attached to and unified with the main bodyapparatus 2. The main body apparatus 2 is an apparatus for performingvarious processes (e.g., game processing) in the information processingsystem 1. The main body apparatus 2 includes a display for displaying animage generated by the main body apparatus 2. Each of the leftcontroller 3 and the right controller 4 is an information processingapparatus including input sections with which a user provides inputs, aninertial sensor for detecting the position or the orientation of thecontroller, and the like.

FIG. 2 is a diagram showing an example of the state where each of theleft controller 3 and the right controller 4 is detached from the mainbody apparatus 2. As shown in FIGS. 1 and 2, the left controller 3 andthe right controller 4 are attachable to and detachable from the mainbody apparatus 2. It should be noted that hereinafter, the leftcontroller 3 and the right controller 4 will occasionally be referred tocollectively as a “controller”.

FIG. 3 is a block diagram showing an example of the internalconfigurations of the main body apparatus 2 and the right controller 4.It should be noted that FIG. 3 shows only portions regarding thetransmission of orientation data of the right controller 4, and otherportions are omitted. Further, hereinafter, only the configuration ofthe right controller 4 will be described, and the configuration of theleft controller 3 will be omitted. The configuration of the leftcontroller 3, however, is similar to that of the right controller 4.

As shown in FIG. 3, the main body apparatus 2 includes a processor 21, aDRAM 22, a controller communication section 23 for the main bodyapparatus 2 to communicate with the controller, and a flash memory 24.Further, the main body apparatus 2 includes a left terminal 25 forperforming wired communication with the left controller 3, and a rightterminal 26 for performing wired communication with the right controller4. Further, although not shown in the figures, the main body apparatus 2includes a battery. The processor 21 is an information processingsection for executing various types of information processing to beexecuted by the main body apparatus 2. For example, the processor 21 maybe composed only of a CPU (Central Processing Unit), or may be composedof a SoC (System-on-a-chip) having a plurality of functions such as aCPU function and a GPU (Graphics Processing Unit) function. Theprocessor 21 executes a program (e.g., a game program) stored in astorage section (specifically, an internal storage medium such as aflash memory 24, an external storage medium attached to a slot of themain body apparatus 2, or the like), thereby performing the varioustypes of information processing.

The controller communication section 23 performs wireless communicationcompliant with, for example, the Bluetooth (registered trademark)standard with the right controller 4. Similarly, the controllercommunication section 23 performs communication compliant with, forexample, the Bluetooth (registered trademark) standard with the leftcontroller 3. It should be noted that the main body apparatus 2 mayperform wireless communication with the controller in accordance withanother standard (e.g., a wireless LAN).

In the state where each of the left controller 3 and the rightcontroller 4 is detached from the main body apparatus 2, the main bodyapparatus 2 performs wireless communication with the left controller 3and the right controller 4 via the controller communication section 23.For example, the main body apparatus 2 receives orientation data(described later) from the left controller 3 and/or the right controller4 and performs various processes based on the received orientation data(e.g., the control of the orientation of a virtual camera for displayinga game image).

As shown in FIG. 3, the right controller 4 includes a processing section41, a memory 42, an inertial sensor 43, a flash memory 44, acommunication control section 45, and a terminal 46. It should be notedthat the right controller 4 includes input sections such as a pluralityof buttons, an analog stick (see FIG. 1), and the like in addition tothese components.

The processing section 41 is connected to the memory 42, the inertialsensor 43, the flash memory 44, the communication control section 45,and the terminal 46 via a bus. Although the details will be describedlater, the processing section 41 calculates the orientation of the rightcontroller 4 based on an output from the inertial sensor 43.

Further, the flash memory 44 stores firmware for controlling the rightcontroller 4, a control program for calculating orientation datadescribed later, and the like.

The communication control section 45 can communicate with the main bodyapparatus 2 through both wired communication via the terminal 46 andwireless communication not via the terminal 46. That is, as shown inFIG. 1, when the right controller 4 is attached to the main bodyapparatus 2, the communication control section 45 communicates with themain body apparatus 2 via the terminal 46. Further, as shown in FIG. 2,when the right controller 4 is detached from the main body apparatus 2,the communication control section 45 wirelessly communicates with themain body apparatus 2 (specifically, the controller communicationsection 23).

For example, when the right controller 4 is not attached to the mainbody apparatus 2 as shown in FIG. 2, orientation data representing theorientation of the right controller 4 calculated by the processingsection 41 is transmitted to the main body apparatus 2 through wirelesscommunication. Alternatively, when the right controller 4 is attached tothe main body apparatus 2 as shown in FIG. 1, the orientation data istransmitted to the main body apparatus 2 via the terminal 46 throughwired communication. Further, the communication control section 45acquires operation information from each input section (specifically,each button, an analog stick, or the like) and transmits operation dataincluding the acquired information (or information obtained byperforming predetermined processing on the acquired information) to themain body apparatus 2.

The communication between the main body apparatus 2 and the rightcontroller 4 is repeatedly performed once every predetermined time.While the communication between the main body apparatus 2 and the rightcontroller 4 is performed once, operation data corresponding to anoperation on each input section and orientation data corresponding to anoutput from the inertial sensor 43 are transmitted from the rightcontroller 4 to the main body apparatus 2. It should be noted that theoperation data and the orientation data may be transmitted at differenttimings. For example, at a certain timing in the communication betweenthe main body apparatus 2 and the right controller 4, either one of theoperation data and the orientation data is transmitted from the rightcontroller 4 to the main body apparatus 2, and at another timing in thecommunication, the other data may be transmitted from the rightcontroller 4 to the main body apparatus 2.

The inertial sensor 43 is, for example, a six-axis sensor. Specifically,the inertial sensor 43 includes an acceleration sensor and an angularvelocity sensor. The acceleration sensor detects the magnitudes ofaccelerations along predetermined three axial (e.g., xyz axes shown inFIG. 1) directions. The angular velocity sensor detects angularvelocities about predetermined three axes (e.g., the xyz axes shown inFIG. 1). The processing section 41 calculates the orientation of theright controller 4 based on the angular velocity values from theinertial sensor 43. Orientation data corresponding to the calculatedorientation is compressed and transmitted to the main body apparatus 2.It should be noted that the processing section 41 calculates theorientation of the controller based on the acceleration values inaddition to the angular velocity values from the inertial sensor 43.

It should be noted that the configurations shown in FIG. 3 are merelyexamples, and the physical configurations may be different from theconfigurations shown in FIG. 3. For example, the communication controlsection 45, the processing section 41, and the memory 42 may be formedin an integrated manner. Further, the controller and/or the main bodyapparatus 2 may include another device, another sensor, or anotherapparatus. Further, in FIG. 3, the controller includes the inertialsensor 43 including the acceleration sensor and the angular velocitysensor. Alternatively, the acceleration sensor and the angular velocitysensor may be separate sensors.

(Transmission of Orientation Data to Main Body Apparatus 2)

Next, a description is given of processing in a case where thecontroller calculates orientation data and transmits the calculatedorientation data to the main body apparatus 2. FIG. 4 is a diagramshowing the flow of processing when orientation data is transmitted fromthe right controller 4 to the main body apparatus 2.

As shown in FIG. 4, first, the acceleration values and the angularvelocity values from the inertial sensor 43 are sampled at apredetermined frequency. For example, the sampling frequency of theacceleration values and the angular velocity values may be 800 Hz. Next,based on the sampled angular velocity values, the orientation of theright controller 4 is calculated. Specifically, the angular velocityvalues output from the inertial sensor 43 are integrated, therebycalculating a quaternion “q” representing the orientation of the rightcontroller 4. In this case, the orientation is calculated by theprocessing section 41.

The quaternion “q” representing the orientation of the controller isrepresented by the following formula 1, using complex numbers i, j, andk.q=w+xi+yj+zk   (formula 1)

Here, i, j, and k satisfy the following relationships.i ² =j ² =k ² =ijk=−1,ij=−jk=k, jk=−kj=i, ki=−ik=j

Further, x, y, and z represent the axes of rotation, and w representsthe angle of rotation. The quaternion q is regarded as a vector havingfour components (w, x, y, and z). Here, the norm of q is 1. That is, w,x, y, and z satisfy the following formula 2.w ² +x ² +y ² +z ²=1   (formula 2)

Based on formula 2, if three of the four components are transmitted fromthe controller to the main body apparatus 2, the main body apparatus 2can restore the remaining one component. Thus, in the exemplaryembodiment, one of the four components is omitted, and three of the fourcomponents are transmitted from the controller to the main bodyapparatus 2. In the exemplary embodiment, the component to be omitted isa component having the largest absolute value. Information to betransmitted from the controller to the main body apparatus 2 includesinformation indicating the omitted component. Consequently, it ispossible to reduce the amount of data transmitted from the controller tothe main body apparatus 2, and the main body apparatus 2 can alsocalculate q representing the orientation of the controller from a vectorhaving three components. It should be noted that the component to beomitted among the four components may not be the component having thelargest absolute value.

Hereinafter, a quaternion having four components representing theorientation of the controller will be represented as “q”. Further, avector having three components obtained by omitting one of the fourcomponents will occasionally be represented as “f”. “f” can be said tobe orientation data representing the orientation of the controller.

As is clear from formula 2, each of the absolute values of thecomponents w, x, y, and z of the quaternion q is a value equal to orless than “1”. In the exemplary embodiment, however, each component ofthe vector f is represented by an integer. For example, a value obtainedby multiplying 10 to the power of n by each component of q is defined aseach component off.

Further, q(t) representing the orientation of the controller at a time tis calculated using the following recurrence relation.q(t)=1/2×q(t−1)*ω×Δt   (formula 3)Here, ω is the angular velocity values from the inertial sensor 43. Δtis the sampling cycle.

In the exemplary embodiment, each of the components (w, x, y, and z) ofthe quaternion q calculated by formula 3 is data represented by 32 bits.

If q representing the orientation is calculated, a thinning process isperformed. While q is calculated at 800 Hz (i.e., 800 times a second) inthe orientation calculation process, q is thinned at, for example, 200Hz in the thinning process. That is, one of four chronologicallysuccessive quaternions q calculated in the orientation calculationprocess is extracted in the thinning process.

Next, mode selection is performed. The mode selection is the process ofselecting in which of a plurality of modes the orientation data is to becompressed and transmitted to the main body apparatus 2. A compressionmethod for compressing the orientation data varies depending on themode. It should be noted that in the exemplary embodiment, the modeselection is performed in the state where the controller is detachedfrom the main body apparatus 2 (i.e., the state where the controller andthe main body apparatus 2 are wirelessly connected together). The modeselection may be performed also in the state where the controller isattached to the main body apparatus 2.

When any of the plurality of modes is selected in the mode selection,the orientation data is compressed in accordance with the selected mode,and a packet including the compressed orientation data is generated bythe communication control section 45. Then, the generated packet iswirelessly transmitted to the main body apparatus 2, and the main bodyapparatus 2 receives the packet. The main body apparatus 2 extracts thecompressed orientation data from the received packet, decompresses thedata, restores the quaternion q, and performs predetermined informationprocessing based on the restored quaternion q.

(Details of the Modes)

Next, the details of the modes are described. FIG. 5 is a diagramshowing examples of the plurality of modes.

As shown in FIG. 5, the plurality of modes include a mode 2, a mode 1,and a mode 0. Based on the three quaternions acquired by the thinningprocess, it is determined whether or not conditions are satisfied, andin accordance with the result of the determination, a mode is selected.Hereinafter, the three acquired quaternions will be represented as “q0”,“q1”, and “q2” in the order of acquisition. That is, q acquired based onan output from the inertial sensor 43 at a time t0 is represented as“q0”. q acquired based on an output from the inertial sensor 43 at atime t1 after the time t0 is represented as “q1”. q acquired based on anoutput from the inertial sensor 43 at a time t2 after the time t1 isrepresented as “q2”. Further, vectors f represented by three componentsand corresponding to “q0”, “q1”, and “q2” are represented as “f0”, “f1”,and “f2”, respectively.

Specifically, first, it is determined whether or not the mode 2 isapplicable. When it is determined that the mode 2 is applicable, themode 2 is selected. When it is determined that the mode 2 is notapplicable, it is determined whether or not the mode 1 is applicable.When it is determined that the mode 1 is applicable, the mode 1 isselected. Then, when it is determined that the mode 1 is not applicable,the mode 0 is selected. A description is given below of each mode and aconditions for applying each mode.

(Description of Mode 2)

The mode 2 is a mode selected in the state where the controller is atrest. Here, “the state where the controller is at rest” refers to thestate where the angular velocity values detected by the inertial sensor43 of the controller are “0” or such minute values that the controllercan be regarded as being at rest. That is, “the state where thecontroller is at rest” is the state where at least at this time, theangular velocity values from the inertial sensor 43 indicate “0” orminute values to such an extent that the controller can be regarded asbeing completely at rest, or being almost at rest.

The mode 2 is selected when first conditions are satisfied. The firstconditions are satisfied when the following formula 4 holds and thefollowing formula 5 also holds.f2−f0<predetermined value   (formula 4) (a first condition A)Δf1<predetermined value   (formula 5) (a first condition B)

Here, Δf1 is represented by the following formula 6.Δf1=f1−(f2+f0)/2   (formula 6)

FIG. 6 is a diagram conceptually representing formula 4. That is, one(the first condition A) of the first conditions for selecting the mode 2is that the difference between f0 and f2 is less than a predeterminedvalue. FIG. 6 represents one component of each of f0, f1, and f2 andindicates that the one component is less than the predetermined value.Actually, each of f0, f1, and f2 is a vector having three components,and “f2−f0” is the difference vector between the vector f2 and thevector f0. Thus, formula 4 indicates that the norm of this differencevector “f2−f0” is less than the predetermined value. When formula 4 (thefirst condition A) does not hold, the mode 2 is not selected, and it isdetermined whether or not second conditions for selecting the mode 1hold. The second conditions will be described later.

When the first condition A (formula 4) holds, then next, it isdetermined whether or not the first condition B holds. FIG. 7 is adiagram conceptually representing the first condition B. It should benoted that similarly to FIG. 6, FIG. 7 also represents one component ofeach of f0, f1, and f2. Specifically, the controller calculates theaverage of f2 and f0 and calculates the difference (the differencevector) between f1 and the average as Δf1. Then, the controllerdetermines whether or not the norm of Δf1 is less than a predeterminedvalue. Here, the predetermined value of the first condition B may bedifferent from or the same as the predetermined value of the firstcondition A. When it is determined that the first condition A issatisfied and it is also determined that the first condition B issatisfied, the mode 2 is selected.

That the first condition A holds means that the values of the componentsof f0 and f2 are close to each other. Further, that the first conditionB holds means that the sample f1 in the center is not too far from theaverage of f0 and f2. This means that when the values of the componentsof the three samples f0, f1, and f2 are plotted on a graph as shown inFIG. 7, the three samples are arranged in an almost straight line in ahorizontal direction. That is, when the first condition A holds and thefirst condition B also holds, then at least during this period, thismeans the state where the orientation of the controller hardly changes,and this means the state where the controller is at rest.

When the mode 2 is selected, f0, f1, and f2 are compressed, therebygenerating first compressed data including this compressed data. FIG. 8Ais a diagram showing an example of the data structure of the firstcompressed data generated when the mode 2 is selected.

As shown in FIG. 8A, first compressed data 210 generated when the mode 2is selected includes a timestamp (TS) 200, mode information (M) 201, andomission information (D) 202.

The timestamp 200 is time information. The timestamp 200 may be timeinformation when any of the three quaternions q0, q1, and q2 iscalculated. Further, the timestamp 200 may be time information when theangular velocity values (the angular velocity values used to calculateany of q0, q1, and q2) are acquired.

The mode information 201 is information indicating in which of the threemodes the orientation data is compressed. When the mode 2 is selected,for example, “2” is set as the mode information 201.

Further, the omission information 202 is information indicating which ofthe four components of the quaternion q is omitted. It should be notedthat in the mode 2, the current state is the state where the controlleris at rest, and q0, q1, and q2 are not largely far from each other.Thus, the component to be omitted (the component having the largestabsolute value) is common to q0, q1, and q2. Thus, in the mode 2, asingle piece of omission information 202 common to the three vectors f0,f1, and f2 is included in the first compressed data 210 and transmittedto the main body apparatus 2.

Further, the first compressed data 210 includes an orientation datasection 203 for storing Δf0 (three components), an orientation datasection 204 for storing Δf1 (three components), and an orientation datasection 205 for storing f2 (three components).

Specifically, 24 bits are assigned to each component of f2. That is, asdescribed above, each component of q and f is represented by 32-bitdata, but each component of f2 is compressed from 32 bits to 24 bits.

Thus, the data size assigned to f2 (the number of bits of theorientation data section 205) is 24 bits×3 components=72 bits. Forexample, when the absolute value of w is the largest among the fourcomponents, namely w, x, y, and z, of q2, w is omitted (i.e.,compressed). Thus, 24 bits are assigned to each of the x, y, andz-components, and the values of these three components are transmittedto the main body apparatus 2 as orientation data f2 representing theorientation of the controller.

Further, the difference between f2 and f0 (the difference vector betweenthe vector f2 and the vector f0) is calculated as Δf0, and 13 bits areassigned to each component of the calculated difference Δf0.Specifically, 13 bits×3 components=39 bits are assigned to Δf0. Forexample, when w is omitted among the four components, namely w, x, y,and z, of q0, 13 bits are assigned to each of the x-component, they-component, and the z-component of Δf0. The main body apparatus 2receives Δf0 and f2 from the controller, and based on Δf0 and f2,calculates each component (e.g., the x-component, the y-component, andthe z-component) of f0. Then, the main body apparatus 2 calculates theomitted component (e.g., the w-component) of q0 based on the aboveformula 2, thereby restoring q0.

Further, 4 bits are assigned to each component of Δf1 calculated basedon formula 6. Specifically, 4 bits×3 components=12 bits are assigned toΔf1. Based on Δf1, f2, and Δf0 received from the controller, the mainbody apparatus 2 calculates each component of f1. Then, based on thethree calculated components of f1, the main body apparatus 2 calculatesthe omitted component, thereby restoring q1.

The total data size of the orientation data sections (Δf0, Δf1, and f2)of the first compressed data 210 in the mode 2 shown in FIG. 8A is13×3+4×3+24×3=123 bits. On the other hand, in a case where eachcomponent of the quaternion q is represented by 32 bits, the size of theorientation data when not compressed is 32 bits×3 components×3=288 bits.Thus, although, due to the compression in the mode 2, it is necessary toadd the mode information 201 indicating which of the three modes isselected, the mode information 201 is represented by 2 bits. Thus, it ispossible to reduce the entire data size as compared with a case wherethe orientation data is not compressed.

A packet is generated by adding a predetermined header to the firstcompressed data 210 shown in FIG. 8A and transmitted from the controllerto the main body apparatus 2. The main body apparatus 2 receives thepacket including the first compressed data 210, restores f0, f1, and f2from the received vectors Δf0, Δf1, and f2, and based on the formula 2and the omission information 202, further restores q0, q1, and q2.

In the mode 2, more bits are assigned to f2 than to Δf0 and Δf1. Thus,it is possible to transmit f2 to the main body apparatus 2 with anamount of information close to f2 before being compressed (32 bits).Thus, it is possible to transmit more accurate information regarding theorientation of the controller to the main body apparatus 2. For example,when f0, f1, and f2 are represented by the same number of bits on thepremise that the total amount of data of the orientation data is reducedto equal to or less than the total amount of data by the compressionmethod in the mode 2 (123 bits), each of f0, f1, and f2 is representedby 13 bits as in the mode 0 described later (because 13 bits×3components×3=117, and 14 bits×3 components×3=126). In this case, sincef2 (and also f1 and f0) is compressed from 32 bits to 13 bits, moreinformation is lost. As a result, the main body apparatus 2 cannotaccurately restore the orientation of the controller based on thecompressed vectors f0, f1, and f2. For example, when a game object isdisplayed on the main body apparatus 2 so as to match the orientation ofthe controller, the main body apparatus 2 cannot accurately restore theorientation of the controller even though, actually, the controller isat rest. Thus, the game object may be displayed in a slightly shakingmanner. In the compression method in the mode 2, however, since morebits are assigned to f2, it is possible to make the amount ofinformation to be lost when f2 is compressed smaller. Thus, the mainbody apparatus 2 can restore the orientation of the controller moreaccurately.

Further, since the mode 2 is selected in the state where the controlleris at rest, the value of each component of Δf0, which is the differencebetween f2 and f0, is a relatively small value. Thus, it is possible torepresent this relatively small value even by a relatively small amountof data (specifically, 13 bits).

Similarly, in the mode 2, f1 is not transmitted as it is to the mainbody apparatus 2, but Δf1, which is the difference between f1 and theaverage of f2 and f0, is transmitted to the main body apparatus 2. Sincethe mode 2 is selected in the state where the controller is at rest, thevalue of each component of Δf1 is a relatively small value. Thus, it ispossible to represent this relatively small value even by a relativelysmall amount of data (specifically, 4 bits).

(Description of Mode 1)

Referring back to FIG. 5, the mode 1 is a mode selected in the statewhere the orientation of the controller changes linearly (the statewhere the orientation does not change sharply). Here, the state wherethe orientation of the controller changes linearly is the state whereeach component of q0, q1, and q2 increases or decreases at almost thesame rate. That is, this state is the state where, for example, in FIG.7, f0, f1, and f2 are arranged in an almost straight line in an obliquedirection.

Specifically, the mode 1 is a mode selected when the second conditionshold in a case where the above first conditions (the first condition Aand the first condition B) do not hold. The second conditions hold whena second condition A shown next holds and a second condition B shownnext also holds.

That is, one (referred to as a “second condition A”) of the secondconditions is that the same components of q0 and q2 as the largestcomponent of q1 (the component having the largest absolute value) aregreater than a predetermined value. For example, when the largestcomponent of q1 is “x”, and the x-components of q0 and q2 are greaterthan a predetermined value (a predetermined value greater than 0; e.g.,“0.5”), the second condition A holds. The second condition A is acondition for guaranteeing that each component of q as a compressiontarget is less than 1. For example, when the largest components of q1,q0, and q2 are x, the w, y, and z-components of q1, q0, and q2 arecompression targets (the vectors f1, f0, and f2 having the w, y, andz-components are compression targets). That the largest components ofq1, q0, and q2 are greater than the predetermined value means that theremaining components are less than “1” from formula 2. If the largestcomponents of q1, q0, and q2 are 0, the remaining components may be “1”(or in the vicinity of “1”). When “1” or a value in the vicinity of “1”is compressed, the compression accuracy may be low. Thus, here, toguarantee the compression accuracy, it is determined whether or not thesecond condition A holds. It should be noted that, actually, data to becompressed is not each component of q, but each component off as aninteger obtained from q. Here, however, a description is given on theassumption that a compression target is each component of q. When thesecond condition A does not hold, the mode 1 is not selected, and themode 0 is selected.

When it is determined that the second condition A holds, then next, itis determined whether or not a second condition B holds. The secondcondition B is that each component of Δf1 calculated by formula 6 can berepresented by 8 bits. Specifically, the second condition B is that thevalue of each component of Δf1 is within the range of −128 to 127. Thateach component of Δf1 can be represented by 8 bits can also mean thateach component of Δf1 is a relatively small value. This means thatregarding each component, the value of the sample f1 in the center isnot too far from the average value of f0 and f2. That is, thedetermination of whether or not the second conditions (the secondcondition A and the second condition B) hold can be said to be thedetermination of whether or not f0, f1, and f2 have linearity.

When each component of Δf1 can be represented by 8 bits, the mode 1 isselected. When the mode 1 is selected, f0, f1, and f2 are compressed bya compression method different from that in the mode 2, therebygenerating second compressed data.

FIG. 8B is a diagram showing an example of the data structure of thesecond compressed data generated when the mode 1 is selected. Similarlyto FIG. 8A, second compressed data 220 generated when the mode 1 isselected includes a timestamp 200, mode information 201, and omissioninformation 202. When the mode 1 is selected, for example, “1” is set asthe mode information 201.

Further, the second compressed data 220 includes an orientation datasection 203 for storing f0 (three components), an orientation datasection 204 for storing Δf1 (three components), and an orientation datasection 205 for storing f2 (three components).

Each component of f0 and f2 is compressed from 32 bits to 16 bits.Specifically, in the mode 1, 16 bits×3 components=48 bits are assignedto f2, and 16 bits×3 components=48 bits are also assigned to f0.

Further, regarding f1, the controller compresses each component of Δf1calculated based on the above formula 6 from 32 bits to 8 bits. That is,8 bits×3 components=24 bits are assigned to Δf1.

As shown in FIG. 8B, also in the mode 1, the second compressed data 220includes the omission information 202 common to f0, Δf1, and f2. Themode 1 is the state where the orientation of the controller changeslinearly. Thus, the component having the largest absolute value amongthe four components is common to q0, q1, and q2. Thus, the omissioninformation 202 is common to f0, Δf1, and f2. Thus, also in the mode 1,similarly to the mode 2, a single piece of omission information 202common to the three vectors f0, f1, and f2 is transmitted to the mainbody apparatus 2.

It should be noted that the data size of the orientation data sections(f0, Δf1, and f2) of the second compressed data 220 in the mode 1 shownin FIG. 8B is 16×3+8×3+16×3=120 bits.

(Description of Mode 0)

Referring back to FIG. 5, the mode 0 is a mode selected when the firstconditions (the first condition A and the first condition B) and thesecond conditions (the second condition A and the second condition B) donot hold. That is, when the mode 2 is not selected and the mode 1 is notselected, either, the mode 0 is selected. The mode 0 is selected whenthe controller is in any state (e.g., the state where the orientation ofthe controller changes sharply in a short time). When the mode 0 isselected, f0, f1, and f2 are compressed, thereby generating thirdcompressed data.

FIG. 8C is a diagram showing an example of the data structure of thethird compressed data generated when the mode 0 is selected. As shown inFIG. 8C, similarly to the mode 2 and the mode 1, third compressed data230 when the mode 0 is selected includes a timestamp 200 and modeinformation 201. When the mode 0 is selected, for example, “0” is set asthe mode information 201.

As shown in FIG. 8C, the third compressed data 230 in the mode 0includes omission information 202 a, omission information 202 b, andomission information 202 c. The omission information 202 a is omissioninformation regarding f0 and is information indicating which of the fourcomponents of q0 is omitted. For example, when the w-component isomitted among the four components, namely w, x, y, and z, “0” may bestored in the omission information 202 a. When the x-component isomitted, “1” may be stored in the omission information 202 a. Similarly,the omission information 202 b is omission information regarding f1 andis information indicating which of the four components of q1 is omitted.Further, the omission information 202 c is omission informationregarding f2 and is information indicating which of the four componentsof q2 is omitted.

The mode 0 is a mode selected when the controller is not at rest, and achange in the orientation of the controller is not linear. The mode 0 isa mode selected, for example, when the orientation of the controllerchanges sharply. In this case, the largest components of the fourcomponents of q0, q1, and q2 may be different from each other. Forexample, the component having the largest absolute value of q0 may bethe x-component, and the component having the largest absolute value ofq1 may be the y-component. Thus, when the mode 0 is selected, thelargest component (the component having the largest absolute value) ofeach of f0, f1, and f2 is omitted. Thus, the omission information 202 isset for each of f0, f1, and f2.

When the mode 0 is selected, each component of f0, f1, and f2 iscompressed from 32 bits to 13 bits. Specifically, 13 bits×3components=39 bits are assigned to f0, 13 bits×3 components=39 bits arealso assigned to f1, and 13 bits×3 components=39 bits are assigned tof2.

It should be noted that the data size of the orientation data sections(f0, f1, and f2) of the third compressed data 220 in the mode 0 shown inFIG. 8C is 13×3×3=117 bits.

FIG. 9 is a diagram showing the comparison between the orientation databefore being compressed when the orientation data is compressed in themode 2, and the orientation data after the compressed orientation datais transmitted to the main body apparatus and restored in the main bodyapparatus.

A dashed line in FIG. 9 indicates the value of the quaternion q (thevalue of one of the four components of q) before being compressed thatis calculated by the controller. Further, a solid line in FIG. 9indicates the value of the quaternion q (the value of one of the fourcomponents of q) after being restored by the main body apparatus 2.

As shown in FIG. 9, even in the state where the controller is at rest,the inertial sensor 43 can slightly detect angular velocities, and theorientation data before being compressed (the dashed line) slightlyfluctuates. The orientation data calculated by the controller iscompressed in the mode 2 and transmitted to the main body apparatus 2.The main body apparatus 2 restores the compressed orientation data. Asshown in FIG. 9, the orientation data after being restored may beslightly shifted from the orientation data before being compressed, butthe orientation data after being restored by the main body apparatus 2almost matches the orientation data before being compressed that iscalculated by the controller.

Although not shown in the figures, if the orientation data is compressedin the mode 0 without compressing the orientation data in the mode 2 inthe state where the controller is at rest, the shift between theorientation data before being compressed and the orientation data afterbeing restored is greater than the shift shown in FIG. 9.

Further, although not shown in the figures, when the orientation of thecontroller changes linearly, the shift between the orientation databefore being compressed and the orientation data after being restored issmaller when the orientation data is compressed in the mode 1 than whenthe orientation data is compressed in the mode 0.

As described above, in the exemplary embodiment, the orientation data iscompressed by a method that varies depending on the state of thecontroller. Specifically, the orientation data is compressed by a methodthat varies depending on the state determined based on data from theinertial sensor 43 of the controller. Consequently, the main bodyapparatus 2 can accurately restore the orientation data.

(Details of Processing Performed by Controller)

Next, the details of processing performed by the controller aredescribed. First, data stored in the controller is described. FIG. 10 isa diagram showing an example of the data stored in the controller.

As shown in FIG. 10, in (the memory 42 or the flash memory 45 of) thecontroller, a control program, sensor data, orientation data, andcompressed data are stored.

The control program includes a program for calculating q representingthe orientation of the controller based on an output from the inertialsensor 43, a program for controlling the communication between thecontroller and the main body apparatus 2, a program for selecting any ofthe plurality of modes, a program for compressing fin the selected mode,a program for generating the compressed data shown in FIGS. 8A to 8C, aprogram for transmitting the compressed data to the main body apparatus2, and the like.

The sensor data is data indicating the angular velocity values about therespective axes output from the inertial sensor 43.

The orientation data is data indicating the quaternion q representingthe orientation of the controller calculated based on an output from theinertial sensor 43. The orientation data includes at least three samples(q0, q1, and q2). The quaternion q has four components, namely w, x, y,and z. Further, the orientation data includes a vector f obtained byomitting one of the four components of q and includes f0 correspondingto q0, f1 corresponding to q1, and f2 corresponding to q2.

Further, the compressed data is data after f0, f1, and f2 arecompressed, and is data to be transmitted from the controller to themain body apparatus 2. Specifically, the compressed data is the datashown in FIGS. 8A to 8C.

Next, the details of the processing performed by the controller arespecifically described. FIG. 11 is a flow chart showing an example ofthe processing performed by the controller. The processing shown in FIG.11 is performed by the processing section 41 of the controller executingthe control program. It should be noted that FIG. 11 only showsprocesses regarding the calculation and the transmission of orientationdata. The controller, however, also executes other processes (a processregarding operation data corresponding to an operation on a button or ananalog stick, and the like) in addition to these processes.

As shown in FIG. 11, (the processing section 41 of) the controlleracquires the angular velocity values about the respective axes from theinertial sensor 43 (step S100). Next, based on the acquired angularvelocity values, the controller calculates and acquires the quaternion qrepresenting the orientation of the controller (step S101).

After step S101, the controller determines whether or not the currenttiming is the timing when the controller communicates with the main bodyapparatus 2 (step S102). When the current timing is not the timing whenthe controller communicates with the main body apparatus 2 (step S102:NO), the controller executes the process of step S100 again. In theexemplary embodiment, the processes of steps S100 to S102 are repeatedlyperformed at 1/800-second intervals. Further, in step S102, when theprocesses of steps S100 to S102 are performed four times, thedetermination is YES. That is, in the exemplary embodiment, theacquisition of the angular velocity values from the inertial sensor 43and the acquisition of “q” representing the orientation are performed at1/800-second intervals, and the processes of step S103 and after thatare repeatedly performed at 1/200-second intervals.

When the determination is YES in step S102, the controller performs athinning process (step S103). Here, the controller extracts the latestquaternion q calculated in step S101.

After step S103, the controller determines whether or not the firstconditions for selecting the mode 2 are satisfied (step S104). In theexemplary embodiment, the first conditions include the first condition Aand the first condition B. The first condition A is that the differencebetween f2 and f0 is less than a predetermined value. Specifically, thecontroller selects the component having the largest absolute value(e.g., the w-component) among the four components of the quaternion q1and sets f1 (e.g., a vector having three components, namely x, y, and z)obtained by omitting the largest component. Further, regarding q2 andq0, the controller sets f2 and f0 obtained by omitting the samecomponents (e.g., the w-components). Then, the controller calculates thedifference vector between f2 and f0, and as the first condition A,determines whether or not the norm of the difference vector is less thanthe predetermined value. It should be noted that q2 may be the latestquaternion q calculated in step S101. Further, q1 may be q calculated instep S101 immediately before q2 (i.e., q calculated 1/800 seconds beforeq2), and q0 may be q calculated in step S101 immediately before q1(i.e., q calculated 1/800 seconds before q1). Further, q2 may be thelatest quaternion q calculated in step S101, q1 may be q extracted instep S103 before q2 (i.e., q calculated 1/200 seconds before q2), and q0may be q extracted in step S103 before q1 (i.e., q calculated 1/200seconds before q1).

When it is determined that the first condition A holds, then in stepS104, the controller further determines whether or not the firstcondition B holds. Specifically, the controller calculates the averageof f2 and f0 and calculates the difference between f1 and the average asΔf1. Then, as the first condition B, the controller determines whetheror not the norm of Δf1 is less than a predetermined value.

When it is determined that the first condition A or the first conditionB does not hold (step S104: NO), the controller determines whether ornot the second conditions for selecting the mode 1 are satisfied (stepS105). Specifically, the controller determines whether or not the secondcondition A holds. The second condition A is that the same components ofq0 and q2 as the largest component (absolute value) of q1 are greaterthan a predetermined value. For example, when the largest component(absolute value) of q1 is w, the controller determines whether or notthe w-components of q0 and q2 are greater than the predetermined value.When it is determined that the second condition A does not hold, thedetermination is NO in step S105. When, on the other hand, it isdetermined that the second condition A holds, the controller furtherdetermines whether or not the second condition B holds. The secondcondition B is that Δf1 can be represented by 8 bits (is within therange of −128 to 127). When it is determined that the second condition Bholds, the determination is YES in step S105. When it is determined thatthe second condition B does not hold, the determination is NO in stepS105.

When the determination is YES in step S104, the controller selects themode 2 and compresses orientation data in the selected mode 2 (stepS106). Specifically, as described above, the controller compresses eachcomponent of f2 to 24 bits, compresses each component of Δf0, which isthe difference between f2 and f0, to 13 bits, and compresses eachcomponent of Δf1 to 4 bits. Then, the controller generates firstcompressed data including these pieces of compressed data.

When the determination is YES in step S105, the controller selects themode 1 and compresses the orientation data in the selected mode 1 (stepS107). Specifically, as described above, the controller compresses eachcomponent of f2 to 16 bits, compresses each component of f0 to 16 bits,and compresses each component of Δf1 to 8 bits. Then, the controllergenerates second compressed data including these pieces of compresseddata.

When the determination is NO in step S105, the controller selects themode 0 and compresses the orientation data in the selected mode 0 (stepS108). Specifically, as described above, the controller compresses eachcomponent of f0 to 13 bits, compresses each component of f1 to 13 bits,and compresses each component of f2 to 13 bits. Further, in step S108,regarding each of q0, q1, and q2, the controller sets the omissioninformation 202 a to 202 c indicating which component is to be omitted.For example, when it is determined that the x-component is to be omittedregarding q0, the controller sets “1” in the omission information 202 a,also sets f0 having three components, namely w, y, and z, and compresseseach component of f0 to 13 bits. Further, when it is determined that they-component is to be omitted regarding q1, the controller sets “2” inthe omission information 202 b, also sets f1 having three components,namely w, x, and z, and compresses each component of f1 to 13 bits.Further, when it is determined that the z-component is to be omittedregarding q2, the controller sets “3” in the omission information 202 c,also sets f2 having three components, namely w, x, and y, and compresseseach component of f2 to 13 bits. Then, the controller generates thirdcompressed data including data related to these compressed vectors f0,f1, and f2 and the omission information.

When the process of any of steps S106 to S108 is performed, thecontroller generates a packet including the compressed data andtransmits the generated packet to the main body apparatus 2 (step S109).

(Example of Processing Performed by Main Body Apparatus 2)

Next, an example of processing performed by the main body apparatus 2 isdescribed. FIG. 12 is a flow chart showing an example of the processingperformed by the main body apparatus 2. It should be noted that theprocessing shown in FIG. 12 is repeatedly executed at predetermined timeintervals (e.g., 1/200-second intervals).

As shown in FIG. 12, the main body apparatus 2 receives the packet fromthe controller (step S201). If receiving the packet from the controller,the main body apparatus 2 restores the orientation data f from thereceived packet (step S202). Specifically, based on the mode information201, the main body apparatus 2 analyzes the received packet anddetermines in which mode the orientation data f is compressed. Then, themain body apparatus 2 restores the orientation data f0, f1, and f2 by amethod corresponding to the mode in which the orientation data f iscompressed. For example, when the orientation data f is compressed inthe mode 2, the main body apparatus 2 decompresses each component of f2from 24 bits to 32 bits. Further, in this case, the main body apparatus2 calculates f0 based on f2 and Δf0 and decompresses each component off0 to 32 bits. Further, the main body apparatus 2 restores f1 based onf2, f0, and Δf1 and decompresses each component of f1 to 32 bits.

Next, the main body apparatus 2 calculates q from the orientation data f(step S203). Specifically, based on the omission information 202included in the packet, the main body apparatus 2 determines whichcomponent is omitted. Then, the main body apparatus 2 calculates theomitted component and restores the quaternion q. For example, when theorientation data is compressed in the mode 2 or the mode 1, then basedon the omission information 202 common to f0, f1, and f2, the main bodyapparatus 2 calculates the omitted component and restores q0, q1, andq2. Further, when the orientation data is compressed in the mode 0, thenbased on the omission information 202 a corresponding to f0, the mainbody apparatus 2 calculates the omitted component of f0 and restores q0.Similarly, based on the omission information 202 b corresponding to f1,the main body apparatus 2 calculates the omitted component of f1 andrestores q1. Further, based on the omission information 202 ccorresponding to f2, the main body apparatus 2 calculates the omittedcomponent of f2 and restores q2.

Then, the main body apparatus 2 executes a process based on the restoredorientation data q (step S204). For example, as the process based on theorientation data q, the process of controlling a virtual camera in avirtual space may be performed. Alternatively, as the process based onthe orientation data q, the process of controlling a user object in thevirtual space may be performed.

It should be noted that the processes shown in the above flow charts aremerely illustrative, and the order and the contents of the processes maybe appropriately changed. Further, the values used in each process anddetermination may be changed.

FIG. 13 is a diagram showing examples of changes in the orientation ofthe controller and modes to be selected. In FIG. 13, the horizontal axisrepresents time, and the vertical axis represents q (one of the fourcomponents of q) representing the orientation. Further, in an upperportion of FIG. 13, thick lines indicating modes selected by the abovemethods are shown. Specifically, in the upper portion of FIG. 13, threethick lines arranged above, in the middle, and below are shown. Amongthe three thick lines, the lower thick line indicates the state wherethe mode 2 is selected, the middle thick line indicates the state wherethe mode 1 is selected, and the upper thick line indicates the statewhere the mode 0 is selected.

For example, up to a time T1, the controller is in the state where thecontroller is at rest, and the value of q is almost “0”. Up to the timeT1, the mode 2 is selected. When the controller is swung by the user atthe time T1, the orientation of the controller changes, and the value ofq changes as shown in FIG. 13. From the time T1 to a time T2, thecontroller is swung relatively slowly, and during this period, the mode1 is selected. Further, at the time T2, for an instant, it is detectedthat the controller is in the state where the controller is at rest, andthe mode 2 is selected. From the time T2 to a time T3, the controller isswung slowly again, and the mode 1 is selected. Next, when thecontroller is swung hard from the time T3 to a time T4, the orientationof the controller changes sharply. During the period from T3 to T4, themode 0 is selected. Further, during the period from the time T4 to atime T5, the controller is swung slowly again, and the mode 1 isselected. When the controller is swung hard at the time T5, the mode 0is selected.

As described above, in the exemplary embodiment, every time thecontroller and the main body apparatus 2 communicate with each other,then in accordance with the state of the controller at that time(specifically, the state determined based on an output from the inertialsensor 43), any of the plurality of modes is selected.

As described above, in the exemplary embodiment, in accordance with thestate of the controller (specifically, the angular velocity valuesoutput from the inertial sensor 43 at that time), any of the pluralityof modes is selected, and orientation data is compressed by a methodcorresponding to the selected mode. Specifically, in accordance withwhether the controller is in the state where the controller is at rest,or is in the state where the orientation of the controller changeslinearly, or is in neither of the states, a mode is selected.

For example, when the controller is in the state where the controller isat rest, the mode 2 is selected, and three pieces of orientation dataare compressed so that the data size of one of the three pieces oforientation data is greater than the data sizes of the other pieces oforientation data, thereby generating first compressed data. Then, thegenerated first compressed data is transmitted to the main bodyapparatus 2. When the mode 2 is not selected, it is determined whetheror not the controller is in the state where the orientation of thecontroller changes linearly. Then, when it is determined that thecontroller is in the state where the orientation of the controllerchanges linearly, the mode 1 is selected. Then, the three pieces oforientation data are compressed by a method corresponding to the mode 1.

Specifically, based on an output from the inertial sensor 43 at a firsttiming, the controller according to the exemplary embodiment acquires afirst value (e.g., f0) regarding the orientation of the controller.Further, based on an output from the inertial sensor 43 at a secondtiming different from the first timing, the controller acquires a secondvalue (e.g., f2) regarding the orientation of the controller. Then, thecontroller determines whether or not the first conditions (e.g., theabove formulas 4 and 5) are satisfied. When it is determined that thefirst conditions are satisfied, the controller compresses at least oneof the first value (e.g., f0) and the second value (e.g., f2) by a firstmethod (a method in the mode 2). Further, when it is determined that thefirst conditions are not satisfied, the controller compresses the firstvalue and the second value by a second method (a method in the mode 1 ora method in the mode 0) different from the first method.

As described above, the controller according to the exemplary embodimentcompresses data by a method that varies depending on whether or not thefirst conditions are satisfied, and thereby can dynamically select anappropriate compression method and compress data regarding theorientation in accordance with the state of the controller.Specifically, data related to the first value and data related to thesecond value are compressed so that the amount of either one of the datarelated to the first value (e.g., f0 or q0) and the data related to thesecond value (e.g., f2 or q2) is greater than the amount of the other.In other words, pieces of data regarding the orientation are compressedso that the compression ratio of one of the pieces of data is lower thanthe compression ratio of the other piece of data. Consequently, it ispossible to make the amount of information to be lost smaller in one ofthe pieces of data than in the other piece of data. Thus, it is possibleto reduce the amount of data transmitted to the main body apparatus 2 asa whole, and the main body apparatus 2 can also accurately restore theorientation of the controller.

Further, when it is determined that the first conditions are notsatisfied, the controller determines whether or not the secondconditions (the second condition A and the second condition B) differentfrom the first conditions are satisfied. When it is determined that thesecond conditions are satisfied, the controller compresses data by thesecond method. In the second method, the controller compresses the datarelated to the first value and the data related to the second value withthe same compression ratio. Further, the controller compresses datarelated to a third value (q1) based on an output from the inertialsensor 43 at a third timing different from the first and second timingsso that the amount of the data related to the third value is smallerthan the amounts of the data related to the first value and the datarelated to the second value. When the second conditions are satisfied,the first value, the second value, and the third value have linearity.Since these values have linearity, if the main body apparatus 2 obtainstwo values, the main body apparatus 2 can accurately guess the remainingone value. Thus, in this case, the controller compresses the datarelated to the first value and the data related to the second value witha relatively low compression ratio and compresses the data related tothe third value at the third timing (more specifically, the timingbetween the first and second timings) with a relatively high compressionratio. Consequently, it is possible to reduce the amount of data as awhole, and the main body apparatus 2 can also accurately restore theorientation of the controller.

Further, in the exemplary embodiment, based on the angular velocityvalues, the controller calculates the orientation of the controller andtransmits the calculated orientation to the main body apparatus 2. Thus,even when a packet from the controller to the main body apparatus 2 islost, it is possible to reduce an error. For example, when the angularvelocity values detected by the inertial sensor 43 are transmitted fromthe controller to the main body apparatus 2, the main body apparatusintegrates the received angular velocity values, thereby calculating theorientation of the controller. In this case, if a packet is lost, themain body apparatus cannot calculate the orientation of the controller.Thus, every time a packet is lost, an error is accumulated. In contrast,in a case where the controller calculates the orientation and transmitsthe calculated orientation to the main body apparatus 2 as in the aboveexemplary embodiment, even when a packet is lost, an error is notaccumulated. The main body apparatus 2 receives the orientationcalculated by the controller, whereby, even when a packet is lost, themain body apparatus 2 can know the accurate orientation of thecontroller at the time when the main body apparatus 2 receives thepacket.

Further, in the exemplary embodiment, compressed data transmitted fromthe controller to the main body apparatus 2 includes time information.Thus, even if a packet is lost, the main body apparatus 2 can accuratelyknow time information of the time when the controller calculates theorientation.

Further, in the exemplary embodiment, based on the angular velocityvalues sampled at 800 Hz, the controller calculates the orientation andtransmits the calculated orientation to the main body apparatus 2 at 200Hz. Consequently, without increasing the frequency of the communicationbetween the main body apparatus 2 and the controller, the main bodyapparatus 2 can acquire the orientation of the controller with higheraccuracy than when the main body apparatus calculates the orientation.For example, a case is assumed where the sampling frequency of theangular velocity values is 800 Hz, and the frequency of thecommunication between the main body apparatus 2 and the controller is200 Hz. In this case, when the angular velocity values from the inertialsensor 43 are transmitted to the main body apparatus 2, and the mainbody apparatus calculates the orientation, it is possible that thecontroller transmits one of the four angular velocity values sampled at800 Hz to the main body apparatus 2, or averages four angular velocityvalues sampled at 800 Hz and transmits the average to the main bodyapparatus 2. In either case, the orientation is calculated at 200 Hz.Thus, there are some limitations to the accuracy of the orientation ofthe controller calculated by the main body apparatus. On the other hand,in the exemplary embodiment, since the controller calculates theorientation at 800 Hz, the main body apparatus can acquire theorientation of the controller with high accuracy.

(Variations)

While the compression methods for compressing orientation data accordingto the exemplary embodiment have been described, the above exemplaryembodiment may be modified as follows.

For example, in the above exemplary embodiment, the first value acquiredbased on an output from the inertial sensor 43 at the first timing isthe quaternion q0 (or f0) representing the orientation of the controllerand calculated based on the angular velocity values from the inertialsensor 43. The first value may be the angular velocity values themselvesoutput from the inertial sensor 43. The same applies to the second valueacquired based on an output from the inertial sensor 43 at the secondtiming, and the third value acquired based on an output from theinertial sensor 43 at the third timing.

Further, in the above exemplary embodiment, based on the vector f havingthree of the four components of the quaternion q representing theorientation of the controller, it is determined whether or not the firstconditions or the second conditions are satisfied, and a mode isselected. Then, f is compressed in the selected mode and transmittedfrom the controller to the main body apparatus 2. In another exemplaryembodiment, based on q having four components, it may be determinedwhether or not the first conditions or the second conditions aresatisfied, and q may be compressed in the selected mode and transmittedfrom the controller to the main body apparatus 2. Further, conditionsfor selecting a mode may be determined based on q, and f may becompressed and transmitted in the selected mode.

Further, in the above exemplary embodiment, the orientation of thecontroller is represented as q (a vector having three componentsrepresenting the axis of rotation and a single component representingthe angle of rotation). Alternatively, in another exemplary embodiment,the orientation of the controller may be represented in another form.For example, the orientation of the controller may be represented usingthe Euler angles, and orientation data regarding the orientationrepresented using the Euler angles may be compressed by a methodcorresponding to any of the plurality of modes described above andtransmitted to the main body apparatus 2.

Further, in the above exemplary embodiment, based on a value acquiredfirst (f0), a value acquired second (f1), and a value acquired third(f2), Δf1 is calculated (the above formula 6). Then, Δf1 is used todetermine each mode. For example, to determine whether or not f0, f1,and f2 have linearity (to determine whether or not the second conditionB is satisfied), it is determined whether or not each component of Δf1is within a predetermined range. In another exemplary embodiment, byanother method, it may be determined whether or not f0, f1, and f2 havelinearity.

“Linearity” as used herein refers to the state where the value acquiredfirst (f0), the value acquired second (f1), and the value acquired third(f2) increase or decrease at almost constant rates. For example, when frepresenting the orientation has x, y, and z-axis components, each ofthe values of the x, y, and z-axis components increases or decreases ata constant rate. Without even using the above formula 6, it is possibleto determine whether or not these values have linearity. For example,the determination can be made based on whether or not the distancebetween a straight line connecting the value acquired first (the valueof each component of f0) and the value acquired second (the value ofeach component of f1), and the value acquired third (the value of eachcomponent of f2) is less than a predetermined value.

Further, in the above exemplary embodiment, the first conditions forselecting the mode 2 are that the above formulas 4 and 5 hold. The firstconditions, however, are not limited to this. For example, based on thecomparison between the first value (f0) and the second value (f2), itmay be determined whether or not the first condition A is satisfied.Further, when the amount of change in the orientation of the controlleris less than a predetermined value, it may be determined that the firstconditions are satisfied. Not only by formula 4 but also by anothermethod, it may be determined whether or not the amount of change in theorientation of the controller is less than a predetermined value. Forexample, when the absolute values of the acquired angular velocityvalues about the respective axes are less than a predetermined value (0or an extremely small value), it may be determined that the firstconditions are satisfied. In this case, based on the angular velocityvalues output from the inertial sensor 43 at a certain time, it ispossible to determine whether or not the first conditions are satisfied.That is, in the above exemplary embodiment, based on outputs from theinertial sensor 43 at at least both the first timing and the secondtiming, it is determined whether or not the first conditions aresatisfied. Alternatively, in another exemplary embodiment, based on anoutput from the inertial sensor 43 at at least one of the first timingand the second timing, it may be determined whether or not the firstconditions are satisfied.

For example, when the orientation of the controller at a certain time iscalculated, and when the angular velocity values regarding three axesfrom the inertial sensor 43 acquired after that are almost “0”, it ispossible to determine that the controller is almost at rest. Thus, notbased on formulas 4 and 5 but based on the angular velocity values fromthe inertial sensor 43, the controller can determine whether or not themode 2 is applicable.

Further, the first conditions for selecting the mode 2 may be not onlythat the controller is in the state where the controller is at rest, butalso that the state of the controller is a predetermined state.

Further, the second conditions for selecting the mode 1 may be anyconditions for determining whether or not the orientation of thecontroller changes linearly. Not only by the above method but also byanother method, it is possible to determine whether or not theorientation of the controller changes linearly. For example, when thedifferences between the angular velocity values of the respective axesfrom the inertial sensor 43 at a certain timing and the angular velocityvalues of the respective axes from the inertial sensor 43 at the nexttiming are “0” or within a predetermined range, it is possible todetermine that the orientation of the controller changes at constantrates, and it is possible to determine that the orientation of thecontroller changes linearly.

Further, in the above exemplary embodiment, in accordance with the stateof the controller determined based on the inertial sensor 43, any of theplurality of modes is selected. In another exemplary embodiment, inaccordance with the state of the controller determined based on otherthan an output from the inertial sensor 43, any of the plurality ofmodes may be selected. For example, based on an image from a camera, thestate of the controller may be determined, and in accordance with thedetermined state of the controller, any of the plurality of modes may beselected.

Further, in the above exemplary embodiment, when the mode 2 is selected,f2 is compressed to 24 bits, the difference between f2 and f0 iscalculated as Δf0, Δf0 is compressed to 13 bits, Δf1 (the above formula6) is further calculated, and Δf1 is compressed to 4 bits. Thecompression method when the mode 2 is selected is merely an example, andthe size of each piece of data after being compressed is not limited tothis. Further, when the mode 2 is selected, the three pieces of data maybe compressed by another compression method. For example, f2 may berepresented by 32 bits without being compressed, and Δf0 and/or Δf1 maybe compressed to a smaller number of bits than the above. Further, whenthe mode 2 is selected, for example, f0 may be compressed to 24 bits (orf0 may not be compressed), Δf2, which is the difference between f0 andf2, may be compressed to 13 bits (or a smaller number of bits thanthis), and Δf1 may be compressed to 4 bits (or a smaller number of bitsthan this). Then, these pieces of compressed data including f0, Δf1, andΔf2 may be transmitted to the main body apparatus 2. Further, f0 and f1may be compressed without calculating Δf0 and Δf1. That is, when themode 2 is selected, these three pieces of data may be compressed so thatthe amount of one of the pieces of data f0, f1, and f2 is greater thanthe amount of the other pieces of data.

Further, in the above exemplary embodiment, when the mode 1 is selected,f0 and f2 are compressed to 16 bits, and Δf1 is compressed to 8 bits.The compression method when the mode 1 is selected is merely an example,and the size of each piece of data after being compressed is not limitedto this. Further, when the mode 1 is selected, the three pieces of datamay be compressed by another compression method. For example, f0 and f1may be compressed to 16 bits, Δf2 may be calculated, and Δf2 may becompressed to 8 bits. Δf2 may be data calculated based on f0, f1, and f2and representing, for example, the difference between the value of f2guessed based on the linearity of f0 and f1, and f2 actually calculatedbased on the angular velocity values. Then, the pieces of compresseddata including f0, f1, and Δf2 may be transmitted to the main bodyapparatus 2.

Further, in the above exemplary embodiment, when the mode 2 or the mode1 is selected, the difference between the average of f0 and f2, and f1is calculated as Δf1, and the calculated difference Δf1 is compressedand transmitted to the main body apparatus 2. In another exemplaryembodiment, based not only on the average of f0 and f2 but also on atleast two of f0 (or q0), f1 (or q1), and f2 (or q2), a predeterminedreference value may be calculated. Then, based on the calculatedreference value, a piece of data related to at least one of f0 (or q0),f1 (or q1), and f2 (or q2) may be set, and the at least one piece ofdata may be compressed. For example, a value indicating how far f0, f1,and f2 are from the calculated reference value may be set, and dataindicating the set value may be compressed and transmitted to the mainbody apparatus 2.

Further, in the above exemplary embodiment, based on data acquired first(f0), data acquired second (f1), and data acquired third (f2), it isdetermined which of the modes 0 to 2 is to be selected, and these threepieces of data are compressed in the mode corresponding to the result ofthe determination and transmitted to the main body apparatus 2. Inanother exemplary embodiment, based on two pieces of data, it may bedetermined which of the modes 0 to 2 is to be selected, and the twopieces of data may be compressed and transmitted.

Further, in another exemplary embodiment, the plurality of modes are notlimited to three, and may be two or four or more.

Further, in the above exemplary embodiment, based on the angularvelocity values from the inertial sensor, the controller calculates avalue regarding the orientation of the controller, selects a mode inaccordance with the state of the controller, compresses data regardingthe orientation by a method corresponding to the mode, and transmits thedata. In another exemplary embodiment, based on the acceleration valuesfrom the inertial sensor, a value regarding the position of thecontroller (the amount of movement in each axial direction) may becalculated, a mode may be selected in accordance with the state of thecontroller, and data regarding the position may be compressed by amethod corresponding to the mode and transmitted. The controllerintegrates the acceleration values from the inertial sensor, therebycalculating the velocity in each axial direction of the controller.Thus, the controller can calculate the position (the amount of movement)in each axial direction from the calculated velocity. In this case, qand f representing the orientation described above are replaced with avector representing the position, and the conditions (the firstcondition A, the first condition B, the second condition A, and thesecond condition B) for selecting a mode are also determined based onthe vector representing the position.

Further, in the above exemplary embodiment, when the controller and themain body apparatus 2 are wirelessly connected together, a mode isselected in accordance with the state of the controller, and dataregarding the orientation of the controller is compressed by acompression method corresponding to the selected mode and transmitted tothe main body apparatus 2. The mode may be selected and the data may becompressed in accordance with the selected mode when the controller andthe main body apparatus 2 are connected together in a wired manner(i.e., when the controller is attached to the main body apparatus 2).

Further, in the above exemplary embodiment, the controller compressesdata regarding the orientation and transmits the data to the main bodyapparatus. In another exemplary embodiment, not only the controller butalso another optional apparatus may select a mode, compress data asdescribed above, and transmit the data to another apparatus. Forexample, an optional apparatus such as a smartphone, a tablet terminal,a laptop personal computer, a wearable terminal, or a sensor may selecta mode, compress data as described above, and transmit the data toanother apparatus.

Further, the above exemplary embodiment is based on the premise that thecontroller and the main body apparatus 2 are locally connected together.Alternatively, in another exemplary embodiment, an optional apparatussuch as a controller and another apparatus may be remotely connectedtogether. The optional apparatus may select a mode, compress datacorresponding to the selected mode as described above, and transmit thecompressed data to another apparatus via the Internet, for example.

While the exemplary embodiment has been described, the above descriptionis merely illustrative, and the exemplary embodiment may be improved andmodified in various manners.

While certain example systems, methods, devices and apparatuses havebeen described herein, it is to be understood that the appended claimsare not to be limited to the systems, methods, devices and apparatusesdisclosed, but on the contrary, are intended to cover variousmodifications and equivalent arrangements included within the spirit andscope of the appended claims.

What is claimed is:
 1. An information processing apparatus including aninertial sensor, the information processing apparatus comprising atleast one processor configured to: based on an output from the inertialsensor at a first timing, acquire a first value regarding an orientationor a position of the information processing apparatus; based on anoutput from the inertial sensor at a second timing different from thefirst timing, acquire a second value regarding the orientation or theposition of the information processing apparatus; based on at least oneof the first value and the second value, determine whether or not afirst condition is satisfied; when it is determined that the firstcondition is satisfied, compress at least one of the first value and thesecond value by a first method, thereby generating first compressed dataincluding data related to the first value and data related to the secondvalue; and when it is determined that the first condition is notsatisfied, compress at least one of the first value and the second valueby a second method different from the first method, thereby generatingsecond compressed data including data related to the first value anddata related to the second value.
 2. The information processingapparatus according to claim 1, wherein the at least one processor isfurther configured to transmit the first compressed data or the secondcompressed data to another apparatus.
 3. The information processingapparatus according to claim 1, wherein based on at least a differencebetween the first value and the second value, it is determined whetheror not the first condition is satisfied.
 4. The information processingapparatus according to claim 1, wherein the at least one processor isfurther configured to, based on an output from the inertial sensor at athird timing different from the first timing and the second timing,acquire a third value regarding the orientation or the position of theinformation processing apparatus, and based on a difference between anaverage of the first value and the second value, and the third value, itis determined whether or not the first condition is satisfied.
 5. Theinformation processing apparatus according to claim 1, wherein as thedetermination of whether or not the first condition is satisfied, it isdetermined whether or not the information processing apparatus is in astate where the information processing apparatus is at rest.
 6. Theinformation processing apparatus according to claim 1, wherein as thedetermination of whether or not the first condition is satisfied, it isdetermined whether or not an amount of change in the orientation or theposition of the information processing apparatus is less than apredetermined value.
 7. The information processing apparatus accordingto claim 1, wherein as the first method, the first compressed data isgenerated so that an amount of either one of the data related to thefirst value and the data related to the second value is greater than anamount of the other.
 8. The information processing apparatus accordingto claim 1, wherein the at least one processor is further configured to,based on an output from the inertial sensor at a third timing differentfrom the first timing and the second timing, acquire a third valueregarding the orientation or the position of the information processingapparatus, and data related to the third value set based on the firstvalue, the second value, and the third value is compressed, therebygenerating the first compressed data further including the compresseddata related to the third value.
 9. The information processing apparatusaccording to claim 8, wherein as the first method, the data related tothe first value and the data related to the second value are compressedso that an amount of the data related to the second value is greaterthan an amount of the data related to the first value, and the datarelated to the third value is further compressed so that the amount ofthe data related to the third value is smaller than the amount of thedata related to the first value, thereby generating the first compresseddata including the compressed data related to the first value, thecompressed data related to the second value, and the compressed datarelated to the third value.
 10. The information processing apparatusaccording to claim 9, wherein the second value is set as the compresseddata related to the second value, a difference between the first valueand the second value is set as the compressed data related to the firstvalue, and a difference between an average of the first value and thesecond value, and the third value is set as the compressed data relatedto the third value, thereby generating the first compressed data. 11.The information processing apparatus according to claim 1, wherein theat least one processor is further configured to, when it is determinedthat the first condition is not satisfied, then at least based on thefirst value and the second value, determine whether or not a secondcondition different from the first condition is satisfied, and when itis determined that the second condition is satisfied, the secondcompressed data is generated.
 12. The information processing apparatusaccording to claim 11, wherein as the determination of whether or notthe second condition is satisfied, it is determined whether or not theorientation or the position of the information processing apparatuschanges linearly.
 13. The information processing apparatus according toclaim 11, wherein the at least one processor is further configured to,based on an output from the inertial sensor at a third timing differentfrom the first timing and the second timing, acquire a third valueregarding the orientation or the position of the information processingapparatus, and based on whether or not the first value, the secondvalue, and the third value have linearity, it is determined whether ornot the second condition is satisfied.
 14. The information processingapparatus according to claim 13, wherein at least when a differencebetween an average of the first value and the second value, and thethird value is a predetermined range, it is determined that the secondcondition is satisfied.
 15. The information processing apparatusaccording to claim 13, wherein a component having the largest absolutevalue among a plurality of components included in any one of the firstvalue, the second value, and the third value is specified, and regardingthe two values other than the one of the first value, the second value,and the third value, components corresponding to the specified componentare compared with a predetermined value, and based on a result of thecomparison, it is determined whether or not the second condition issatisfied.
 16. The information processing apparatus according to claim13, wherein as the second method, data related to the third value is setbased on an average of the first value and the second value, and thedata related to the third value is compressed, thereby generating thesecond compressed data including the compressed data related to thethird value.
 17. The information processing apparatus according to claim13, wherein the at least one processor is further configured to, basedon at least two of the first value, the second value, and the thirdvalue, calculate a predetermined reference value, and as the secondmethod, data related to at least one of the first value, the secondvalue, and the third value is set based on the reference value, and thedata related to the at least one value is compressed, thereby generatingthe second compressed data including the compressed data.
 18. Theinformation processing apparatus according to claim 13, wherein as thesecond method, the data related to the first value, the data related tothe second value, and data related to the third value are compressed sothat amounts of the data related to the first value and the data relatedto the second value are equal to each other, and the amounts of the datarelated to the first value and the data related to the second value aregreater than an amount of the data related to the third value.
 19. Theinformation processing apparatus according to claim 4, wherein thesecond timing is a timing after the first timing, and the third timingis a timing between the first timing and the second timing.
 20. Theinformation processing apparatus according to claim 11, wherein the atleast one processor is further configured to, when it is determined thatthe second condition is not satisfied, compress at least the datarelated to the first value and the data related to the second value by athird method different from the first method and the second method,thereby generating third compressed data including the data related tothe first value and the data related to the second value.
 21. Theinformation processing apparatus according to claim 20, wherein thefirst value and the second value are data including a plurality ofcomponents, and the plurality of components have a predeterminedrelationship, the data related to the first value and the data relatedto the second value are data obtained by omitting at least one of theplurality of components, and the third compressed data includesinformation indicating the component omitted from the data related tothe first value and information indicating the component omitted fromthe data related to the second value.
 22. The information processingapparatus according to claim 1, wherein the at least one processor isfurther configured to: based on the output from the inertial sensor atthe first timing, calculate the first value representing the orientationor the position of the apparatus; based on the output from the inertialsensor at the second timing, calculate the second value representing theorientation or the position of the apparatus; and transmit dataincluding the first value and the second value to another apparatus. 23.A non-transitory computer-readable storage medium having stored thereina program executed by a processor of an information processing apparatusincluding an inertial sensor, the program causing the processor toexecute: based on an output from the inertial sensor at a first timing,acquiring a first value regarding an orientation or a position of theinformation processing apparatus; based on an output from the inertialsensor at a second timing different from the first timing, acquiring asecond value regarding the orientation or the position of theinformation processing apparatus; based on at least one of the firstvalue and the second value, determining whether or not a first conditionis satisfied; when it is determined that the first condition issatisfied, compressing at least one of the first value and the secondvalue by a first method, thereby generating first compressed dataincluding data related to the first value and data related to the secondvalue; and when it is determined that the first condition is notsatisfied, compressing at least one of the first value and the secondvalue by a second method, thereby generating second compressed dataincluding data related to the first value and data related to the secondvalue.
 24. An information processing system including a first apparatusincluding an inertial sensor and a second apparatus for communicatingwith the first apparatus, the first apparatus configured to: based on anoutput from the inertial sensor at a first timing, acquire a first valueregarding an orientation or a position of the first apparatus; based onan output from the inertial sensor at a second timing different from thefirst timing, acquire a second value regarding the orientation or theposition of the first apparatus; based on at least one of the firstvalue and the second value, determine whether or not a first conditionis satisfied; when it is determined that the first condition issatisfied, compress at least one of the first value and the second valueby a first method, thereby generating first compressed data includingdata related to the first value and data related to the second value;and when it is determined that the first condition is not satisfied,compress at least one of the first value and the second value by asecond method, thereby generating second compressed data including datarelated to the first value and data related to the second value; andtransmit the first compressed data or the second compressed data to thesecond apparatus, and the second apparatus configured to receive thetransmitted first compressed data or second compressed data.
 25. Aninformation processing method performed by an information processingapparatus including an inertial sensor, the information processingmethod comprising: based on an output from the inertial sensor at afirst timing, acquiring a first value regarding an orientation or aposition of the information processing apparatus; based on an outputfrom the inertial sensor at a second timing different from the firsttiming, acquiring a second value regarding the orientation or theposition of the information processing apparatus; based on at least oneof the first value and the second value, determining whether or not afirst condition is satisfied; when it is determined that the firstcondition is satisfied, compressing at least one of the first value andthe second value by a first method, thereby generating first compresseddata including data related to the first value and data related to thesecond value; and when it is determined that the first condition is notsatisfied, compressing at least one of the first value and the secondvalue by a second method, thereby generating second compressed dataincluding data related to the first value and data related to the secondvalue.